<?php

class Services extends Zend_Db_Table_Abstract
{
	protected $_name = 'case_services';

	public function getServicesForLocaleId( $locale_id )
	{
		$select = $this->getAdapter()->select()
		->from('case_services', array(
		'item_category'=>'item_category',
		'line_number'=>'line_number',
		'item_description'=>'item_description',
		'price_list_id'=>'price_list_id',
		'item_seq_number'=>'item_seq_number',
		'item_amount'=>'item_amount'
		)
		)
		->where("locale=?", $locale_id);

		$result = $this->getAdapter()->fetchAll($select);
		if($result) {
			
			$rows = array();
			foreach ($result as $row) {
				
				$itemnum = $row['item_seq_number'];
				if($itemnum >= 100 && $itemnum <= 199 )
				$rows[] = $row;
			}
			return $rows;
		}
		return array();
	}
}
?>